﻿
using System.Collections.Generic;
using System.Linq;

namespace EntityFramework
{
    public class BannersBO
    {
        public static List<Banner> GetTopContact(int top)
        {
            using (var db = new WebsiteEntities())
            {
                return db.Banners.Where(d => d.status == 1).OrderByDescending(d => d.dateEdit).Take(top).ToList();
            }
        }
    }
}
